<%--
  -	Date: 2012-07-31
  -
  - Copyright (C) 2012 Jawa Software. All rights reserved.
  - 
  - 随机生成试卷页面。
--%>
<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<%@ page import="org.jawa.admin.util.ParamUtils,org.jawa.core.util.*,org.jawa.core.JawaServer,org.jawa.exam.model.*,org.jawa.exam.question.QuestionManager"%>
<%@ page import="java.util.Collection,java.util.List,java.util.ArrayList"
%>
<%@ page import="org.apache.commons.lang.StringUtils"%>

<jsp:useBean id="webManager" class="org.jawa.admin.util.WebManager"  />
<%
	webManager.init(request, response, session, application, out);
	String path = request.getContextPath();
%>
<!DOCTYPE html>
<html lang="en">
	<head>
		<title>试卷管理</title>
		<meta name="pageID" content="2102" />
	</head>
	<body>
	
	<div class="row-fluid">
		<ul class="breadcrumb">
			<li>您现在的位置:</li>
			<li><a href="<%=path%>/admin/index.jsp">考试管理</a></li>
			<li><span class="divider">/</span></li>
			<li class="active">随机生成试卷</li>
		</ul>

		<div class="page-header hide">
			<h3>随机生成试卷</h3>
		</div>
		
		<form action="createRandomPaper.jsp" method="post" class="form-horizontal well" id="paperForm" >
			<fieldset>
				<legend>随机生成试卷 </legend>
				<div class="control-group">
					<label class="control-label">试卷名称: </label>
					<div class="controls">
						<input name="paperName" type="text" class="required">
					</div>
				</div>
				<div class="control-group">
					<label class="control-label"> 一、单选题数量 </label>
					<div class="controls">
				  		<input name="single" type="text" class="required">
						<span class="help-inline">当前共有<%=QuestionManager.getInstance().getQuestionCount("1") %>个题目 </span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label"> 二、多选题数量 </label>
					<div class="controls">
						<input name="muti" type="text" class="required">
						<span class="help-inline">当前共有<%=QuestionManager.getInstance().getQuestionCount("2") %>个题目 </span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label"> 三、判断题数量 </label>
					<div class="controls">
						<input name="error" type="text" class="required">
						<span class="help-inline">当前共有<%=QuestionManager.getInstance().getQuestionCount("3") %>个题目 </span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label"> 四、回答题数量 </label>
					<div class="controls">
						<input name="dd" type="text" class="required">
						<span class="help-inline">当前共有<%=QuestionManager.getInstance().getQuestionCount("4") %>个题目 </span>
					</div>
				</div>
				<div class="form-actions">
					<input type="submit" name="create" value="保存" class="btn btn-primary">
					<input type="button" name="return" value="返回" class="btn btn-primary" onclick="window.location.href='index.jsp'" />
				</div>
			</fieldset>
		</form>
	</div>
	<script src="<%= path %>/scripts/bootstrap.js"></script>
	<script src="<%= path %>/scripts/jquery.validate.js"></script>
	<script src="<%= path %>/scripts/global.js"></script>
	<script>
		$().ready(function() {
			$("#paperForm").validate({
			});	
		});
	</script>
</body>
</html>
